S

SideButton Marketing Website Knowledge Module

SideButton Marketing Website Connect (Extension Auth) — Knowledge Module Reference

SideButton Marketing Website knowledge module — UI selectors, data model, and page states documenting Connect (Extension Auth).

Available free v1.0.3 Browser
$ sidebutton install SideButton Marketing Website
Download ZIP
Path
/connect
Verified
2026-02-21
Confidence
95%
Role playbooks
0
Pack
SideButton Marketing Website
Domain
sidebutton.com

What This Is

Standalone authentication page for the SideButton Chrome extension. No Header or Footer -- a minimal centered card with email/password form on a light gradient background. After successful login, credentials (email, userCode, mcpUrl) are sent to the extension via three methods (chrome.runtime.sendMessage, window.postMessage, localStorage), then the page shows a success view with green checkmark and auto-closes after 2.5 seconds. The page also displays hardcoded test credentials for Phase 1 development.

URL Patterns

PatternDescription
/connectExtension auth page (no extension messaging)
/connect?ext={extensionId}With extension ID for chrome.runtime.sendMessage

Page Structure

+--[Full viewport, centered, no Header/Footer]------+
|  Background: linear-gradient #F8FAFC → #F1F5F9    |
|                                                     |
|  +--[.card — white, rounded-16, shadow, 400px]---+ |
|  |                                                 | |
|  |  [#loginForm]                                   | |
|  |    [.header]                                    | |
|  |      [.logo] 56×56 green gradient, bolt icon    | |
|  |      H1: "Sign in to SideButton"               | |
|  |      P.subtitle: "Connect your browser to       | |
|  |                    Claude Desktop"              | |
|  |                                                 | |
|  |    [.error #error] hidden by default            | |
|  |                                                 | |
|  |    [.form-group]                                | |
|  |      Label "Email" + input#email                | |
|  |    [.form-group]                                | |
|  |      Label "Password" + input#password          | |
|  |                                                 | |
|  |    Button#signInBtn "Sign In"                   | |
|  |                                                 | |
|  |    [.hint] Test credentials (Phase 1)           | |
|  |      [email protected] / demo2026             | |
|  |                                                 | |
|  |  [#successView] hidden by default               | |
|  |    [.success-icon] green circle + checkmark     | |
|  |    "Connected!"                                 | |
|  |    "You can close this tab..."                  | |
|  |                                                 | |
|  |  [.footer-link]                                 | |
|  |    "Back to SideButton" → /                     | |
|  +------------------------------------------------+ |
+-----------------------------------------------------+

Key Elements

ElementSelectorNotes
Card container.cardWhite, max-width: 400px, border-radius: 16px, padding: 40px
Logo.logo56x56px green gradient square with bolt SVG
Headingh1"Sign in to SideButton", font-size: 22px, color #0F172A
Subtitle.subtitle"Connect your browser to Claude Desktop", color #64748B
Login form wrapper#loginFormContains all form fields; hidden on success
Error message#error / .errorRed background #FEF2F2, border #FECACA, display: none by default
Email labellabel[for="email"]"Email"
Email inputinput#emailtype="email", placeholder "[email protected]", autofocus
Password labellabel[for="password"]"Password"
Password inputinput#passwordtype="password", placeholder "Enter your password"
Sign In buttonbutton#signInBtnGreen gradient #15C39A → #0EA87D, type="button"
Test credentials hint.hintShows [email protected] / demo2026
Success view#successViewdisplay: none by default, shown after successful auth
Success icon.success-icon64x64px green circle with check polyline SVG
Success title.success-title"Connected!"
Success text.success-text"You can close this tab and return to the extension."
Back link.footer-link a"Back to SideButton" → /

Data Model

FieldTypeDescription
emailstring (email)User email address, trimmed before submission
passwordstringUser password, sent as-is
ext (URL param)stringChrome extension ID for chrome.runtime.sendMessage

API Request (POST)

FieldTypeDescription
emailstringFrom #email input, trimmed
passwordstringFrom #password input

API Response (success)

FieldTypeDescription
okbooleantrue on success
emailstringAuthenticated user email
userCodestringUser identification code
mcpUrlstringMCP server endpoint URL

API Response (failure)

FieldTypeDescription
okbooleanfalse on failure
errorstringError message (fallback: "Invalid email or password")

localStorage (on success)

KeyValueDescription
sidebutton_authJSON stringContains email, userCode, mcpUrl, timestamp

States & Variations

StateTriggerVisual Indicator
DefaultPage loadEmpty form with email (autofocused) and password fields, Sign In button green
Input focusedClick/tab into fieldBorder changes to #15C39A, background to white, green ring shadow 3px
Client validation errorClick Sign In with empty field(s)Error div shows "Please enter email and password", button stays enabled
SubmittingClick Sign In with valuesButton disabled, gray #94A3B8 background, text "Signing in...", no hover/shadow
Server errorInvalid credentials / API errorError div shows server message or "Connection failed. Please try again.", button re-enabled, text "Sign In"
SuccessValid credentials#loginForm hidden, #successView shown with green checkmark, "Connected!" title
Auto-close2.5s after successwindow.close() called (may be blocked by browser if tab was not script-opened)

Responsive Behavior

BreakpointBehavior
All widthsCard is max-width: 400px, width: 100%; body has padding: 20px
Mobile (<400px)Card fills viewport width minus 40px padding; all elements stack vertically
Desktop (>400px)Card centered in viewport with box-shadow

API Host Resolution

EnvironmentAPI Host
Development (localhost / 127.0.0.1)http://localhost:9877
Productionwindow.location.origin (same origin via nginx proxy)

Common Tasks

1. Verify form fields present

  1. Navigate to /connect
  2. Confirm h1 reads "Sign in to SideButton"
  3. Confirm .subtitle reads "Connect your browser to Claude Desktop"
  4. Confirm input#email exists with placeholder "[email protected]"
  5. Confirm input#password exists with placeholder "Enter your password"
  6. Confirm button#signInBtn reads "Sign In"

2. Submit form with test credentials

  1. Click input#email, type [email protected]
  2. Click input#password, type demo2026
  3. Click button#signInBtn
  4. Verify button text changes to "Signing in..." and becomes disabled
  5. Wait for #successView to become visible
  6. Verify "Connected!" title appears

3. Verify client-side validation

  1. Leave both fields empty
  2. Click button#signInBtn
  3. Verify #error displays "Please enter email and password"
  4. Fill only email, clear password, click Sign In again
  5. Verify same error message appears

4. Verify server error handling

  1. Type invalid email (e.g., [email protected]) and any password
  2. Click button#signInBtn
  3. Verify #error shows server error message (e.g., "Invalid email or password")
  4. Verify button re-enables with text "Sign In"

5. Verify keyboard navigation

  1. Focus input#email, press Enter
  2. Verify focus moves to input#password
  3. Focus input#password, press Enter
  4. Verify form submits (equivalent to clicking Sign In)

6. Verify Back link

  1. Click .footer-link a ("Back to SideButton")
  2. Verify navigation to / (homepage)

Tips

  • The page is a standalone HTML document -- no Astro Layout, Header, or Footer components; no Tailwind CSS classes
  • All styling is inline <style> in the <head> -- no external CSS files loaded
  • The form does NOT use a <form> element; submit is handled by a click listener on button#signInBtn
  • Enter key on email field moves focus to password; Enter key on password field triggers sign-in
  • Three credential delivery methods fire in sequence on success: chrome.runtime (if ext param), postMessage, localStorage
  • The ext URL parameter is optional -- without it, only postMessage and localStorage methods are used
  • Test credentials ([email protected] / demo2026) are displayed in a .hint section below the form
  • The autofocus attribute on the email input means it receives focus on page load without any script

Gotchas

  • No <form> element: The page uses <div> wrappers and a button[type="button"] -- standard form submission and required attribute validation do not apply; all validation is in the click handler
  • window.close() may be blocked: Browsers only allow window.close() on tabs opened by script (window.open); if the user navigated to /connect directly, the auto-close after 2.5s will silently fail
  • Client validation is minimal: Only checks for empty fields (!email || !password); no email format validation on the client side (HTML type="email" provides some browser-native validation but is not enforced by the script)
  • API host differs by environment: Development uses localhost:9877, production uses same-origin -- tests must account for which environment they run in
  • postMessage uses wildcard origin: window.postMessage({...}, "*") sends to all origins -- this is intentional for extension communication but is a security consideration
  • No CSRF protection: The form posts directly to the API with no CSRF token; relies on same-origin policy and CORS